﻿namespace WMS.FC.Domain.PersistenceObject.System
{
    public class MenuPO : POBase
    {
        /// <summary>
        /// 中文名称
        /// </summary>
        public string NameCN { get; set; } = string.Empty;

        /// <summary>
        /// 英文名称
        /// </summary>
        public string? NameEN { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; } = string.Empty;

        /// <summary>
        /// 类型编码
        /// </summary>
        public string TypeCode { get; set; } = string.Empty;

        /// <summary>
        /// 菜单位置
        /// </summary>
        public string MenuPositionCode { get; set; } = string.Empty;

        /// <summary>
        /// 排序
        /// </summary>
        public int SortNumber { get; set; }

        /// <summary>
        /// 菜单地址
        /// </summary>
        public string? Url { get; set; }

        /// <summary>
        /// SQL
        /// </summary>
        public string? Sql { get; set; }

        /// <summary>
        /// 菜单配置
        /// </summary>
        public string? ConfigJson { get; set; }

        /// <summary>
        /// 父菜单ID
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 父菜单
        /// </summary>
        public MenuPO? Parent { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public List<RolePO> Roles { get; set; } = new List<RolePO>();

        /// <summary>
        /// 子菜单
        /// </summary>
        public List<MenuPO> SubMenu { get; set; } = new List<MenuPO>();
    }
}
